import React from 'react';
import { cn } from '@/lib/utils';

interface StatusBadgeProps {
  status: 'normal' | 'warning' | 'error' | 'info' | 'pending' | 'completed' | 'inProgress' | 'primary' | 'default';
  children: React.ReactNode;
  className?: string;
}

export function StatusBadge({ 
  status, 
  children,
  className 
}: StatusBadgeProps) {
  // 根据状态确定样式
  const statusStyles = {
    normal: 'status-normal',
    warning: 'status-warning',
    error: 'status-error',
    info: 'status-info',
    pending: 'status-warning',
    completed: 'status-normal',
    inProgress: 'status-info',
    primary: 'status-primary',
    default: 'status-default',
  };
  
  return (
    <span 
      className={cn(
        "inline-flex items-center justify-center",
        statusStyles[status],
        className
      )}
    >
      {children}
    </span>
  );
}

export default StatusBadge; 